package com.csw.mysqldate.fegin;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

@Slf4j
@RestController
@RequestMapping("/mysqldate/receivefegin")
public class ReceiveFeginController {

    @RequestMapping(value = "/none", method = RequestMethod.GET)
    public void none() throws InterruptedException {
        log.info("none");
        TimeUnit.SECONDS.sleep(3);
        log.info("none-success");


    }

    @RequestMapping(value = "/idd", method = RequestMethod.GET)
    public void id(String id) {//注意
        log.info("收到了】" + id);
    }

    @RequestMapping(value = "/object", method = RequestMethod.POST)
    public void object(@RequestBody JSONObject object) {
        log.info("收到了】" + object.toJSONString());
    }
}
